<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>显示时间</title>
    <style>
        #show-div {
            border: 1px solid blue;
            font-size: 20px;
            font-weight: 700;
        }
    </style>
</head>

<body>
    <div><span id="show-div"></span></div>

    <script src="https://cdn.bootcdn.net/ajax/libs/moment.js/2.29.4/moment.min.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
    <script>
        let weekday = '星期' + moment().isoWeekday();
        $('#show-div').html(moment().format('YYYY年M月D日 h:m:sA ') + weekday);

        setInterval(() => {
            let weekday = '星期' + moment().isoWeekday();
            $('#show-div').html(moment().format('YYYY年M月D日 h:m:sA ') + weekday);
        }, 1000);
    </script>
</body>

</html>